import Vue from 'vue'
import App from './App.vue'

import Apple from './components/apple'
import redApple from './components/redApple'
import Cat from './components/cat'


import VueRouter from 'vue-router'

Vue.use(VueRouter); // vue 注册使用 vue-router

Vue.config.productionTip = false

let router = new VueRouter({
    routes:[
        {
            path:'/apple',
            component:Apple,
            children:[
                {
                    path:'red',
                    component:redApple
                }
            ]
        },
        {
            path:'/cat',
            component:Cat
        },
    ]
});


new Vue({
    render: h => h(App),
    router: router,
}).$mount('#app')
